Skip to content

feat: add wait_for_resources to the methods that start a run - #1273

Open
vdusek wants to merge 1 commit into
feat/child-run-concurrency-limitfrom
feat/child-run-wait-for-resources
Open

vdusek wants to merge 1 commit into
feat/child-run-concurrency-limitfrom
feat/child-run-wait-for-resources

Conversation

@vdusek

@vdusek vdusek commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Part 7 of 7 of the target state of Actor composability, section 10. Stacked on #1154.

  • New option wait_for_resources: bool | timedelta | None = None on Actor.start, Actor.call, Actor.start_task, and Actor.call_task. A start that the API rejects for the memory or concurrent-run limit of the account is retried every 10 seconds. True retries until the run starts, and a timedelta stops after that time and raises the last error.
  • For an untracked run the option goes to the API client. For a tracked run the SDK retries the start itself, so the waiting start keeps the lock of its key and its slot of the concurrency limit.
  • After ABORTING, a tracked start that waits for resources raises a RuntimeError.
  • A timedelta also covers the time that the call waits for a slot of the concurrency limit.
  • A resurrection with resurrect_with_parent is not retried.

✍️ Drafted by Claude Code

@vdusek
vdusek added this pull request to stack #1274 November 20, 2026 16:35
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 20, 2026
@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.20%. Comparing base (1fa9bba) to head (0b77368).

Additional details and impacted files
@@                         Coverage Diff                          @@
##           feat/child-run-concurrency-limit    #1273      +/-   ##
====================================================================
+ Coverage                             94.15%   94.20%   +0.04%     
====================================================================
  Files                                    54       54              
  Lines                                  4312     4346      +34     
====================================================================
+ Hits                                   4060     4094      +34     
  Misses                                  252      252              
Flag Coverage Δ
e2e 30.28% <20.00%> (?)
integration 47.97% <20.00%> (-0.20%) ⬇️
unit 91.73% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek added the adhoc Ad-hoc unplanned task added during the sprint. label Nov 20, 2026
@vdusek vdusek self-assigned this Nov 20, 2026
@vdusek
vdusek force-pushed the feat/child-run-wait-for-resources branch from e8bce80 to b6082a7 Compare November 20, 2026 17:52
@vdusek
vdusek marked this pull request as ready for review November 20, 2026 17:58
@vdusek
vdusek requested review from Pijukatel and barjin November 20, 2026 17:58
@vdusek
vdusek force-pushed the feat/child-run-wait-for-resources branch from b6082a7 to 0b77368 Compare November 20, 2026 18:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant